home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
rexx
/
MedTool.lha
/
Medtool.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1997-08-25
|
2KB
|
89 lines
/* $VER: MedTool.rexx 1.0 (20.08.97) by A.Schumm */
/* Zum Erstellen von Instrumentenlisten für Octamed */
/* creates sample-lists for octamed */
options results
SIGNAL ON break_c
SIGNAL ON failure
SIGNAL ON halt
SIGNAL ON ioerr
SIGNAL ON syntax
IF ~SHOW('LIBRARIES','rexxreqtools.library') THEN DO
IF ~ADDLIB('rexxreqtools.library',0,-30) THEN DO
SAY 'need the <rexxreqtools.library> !!!'
EXIT(10)
END
END
IF ~SHOW('LIBRARIES','rexxarplib.library') THEN DO
IF ~ADDLIB('rexxarplib.library',0,-30,0) THEN DO
SAY 'need th <rexxarplib.library> !!!'
EXIT(10)
END
END
datei = rtfilerequest('ram:','med_paths','select a new list:',,,)
IF ~rtresult THEN EXIT(10)
platte = rtfilerequest('DH0:',,'Where are the samples ?','create','rtfi_flags = freqf_nofiles',)
IF ~rtresult THEN EXIT(10)
a = open('ausgabe',datei,'W')
Summe = 0
Andir = 0
PostMsg(270,60,'MedTool 1.0 by Andreas Schumm\'Summe' Samples')
Summe = KATALOG(platte)
a = rtezrequest('In all: 'Summe' Samples','Super!',,,)
a = close ("ausgabe")
TheEnd(0)
KATALOG:procedure expose Summe Andir
arg path
Anz_Dirs = filelist(path'#?',DirListe,D,E)
IF Anz_Dirs >0 THEN DO
Andir = Andir + Anz_Dirs
do j = 1 to Anz_Dirs
Summe=KATALOG(Dirliste.j'/',1)
end
END
Anz_Inst = filelist(path'~(#?.info)',FileListe,F,N)
IF Anz_Inst = 0 THEN Return Summe
b = writeln('ausgabe','*'path)
do a = 1 to Anz_Inst
b = writeln('ausgabe',FileListe.a)
end
Summe = Summe+Anz_Inst
PostMsg(270,60,'MedTool 1.0 by Andreas Schumm\'Summe' Samples\in 'Andir' directory(s)')
return Summe
/* Normales Ende */
TheEnd: procedure
parse arg ErrCode
PostMsg()
CALL REMLIB('rexxarplib.library')
CALL REMLIB('rexxreqtools.library')
address COMMAND 'avail >NIL: flush'
EXIT(ErrCode)
return
/* Fehlerbehandlung */
break_c:
failure:
halt:
ioerr:
syntax:
say '+++ Fehler' rc 'in Zeile' sigl '-' ERRORTEXT(rc)
say SOURCELINE(sigl)
IF app ~= '00000000'x THEN
CALL TR_DELETEAPP (app)
EXIT(10)